﻿@model CommonSettingsModel
@using Urs.Data.Domain.Users;
@using Urs.Data.Domain.Security;

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">综合设置</div>
                <div class="layui-card-body">
                    <div class="layui-form" wid200 lay-filter="">
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreName" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.StoreName" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreUrl" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.StoreUrl" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreClosed" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="StoreInformationSettings.StoreClosed" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreClosedAllowForAdmins" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="StoreInformationSettings.StoreClosedAllowForAdmins" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.ServiceTelePhone" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.ServiceTelePhone" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreServiceTime" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.StoreServiceTime" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.OnlineConsultingCode" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.OnlineConsultingCode" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.CopyrightInfo" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.CopyrightInfo" />
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.ICPRecord" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="StoreInformationSettings.ICPRecord" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreLogo1" />
                            <div class="col-md-9">
                                <u-editor asp-for="StoreInformationSettings.StoreLogo1" />
                                <span asp-validation-for="StoreInformationSettings.StoreLogo1"></span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreLogo2" />
                            <div class="col-md-9">
                                <u-editor asp-for="StoreInformationSettings.StoreLogo2" />
                                <span asp-validation-for="StoreInformationSettings.StoreLogo2"></span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="StoreInformationSettings.StoreLogo3" />
                            <div class="col-md-9">
                                <u-editor asp-for="StoreInformationSettings.StoreLogo3" />
                                <span asp-validation-for="StoreInformationSettings.StoreLogo3"></span>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.EncryptionKey" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="SecuritySettings.EncryptionKey" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.AdminAreaAllowedIpAddresses" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="SecuritySettings.AdminAreaAllowedIpAddresses" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.HideAdminMenuItemsBasedOnPermissions" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="SecuritySettings.HideAdminMenuItemsBasedOnPermissions" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.CaptchaEnabled" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="SecuritySettings.CaptchaEnabled" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.UseSsl" />
                            <div class="layui-input-inline">
                                <u-bool asp-for="SecuritySettings.UseSsl" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <u-label asp-for="SecuritySettings.SharedSslUrl" />
                            <div class="layui-input-inline" style="width:802px">
                                <u-editor asp-for="SecuritySettings.SharedSslUrl" />
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="set_system_submit_btn">确认保存</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'set'], function () {
        var $ = layui.$
            , form = layui.form
            ,active = { }
        form.on('submit(set_system_submit_btn)', function (obj) {
          var field = obj.field; //获取提交的字段
                //提交 Ajax 成功后，关闭当前弹层并重载表格
                    $.post('@Url.Action("Common")', field, function (rep)
                    {
                        if (rep.success == 1) {
                            layer.msg('保存成功');
                        }
                    }
                );
            });

        $('.layui-btn.layuiadmin-btn-tags').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });

</script>



